package com.example.hello_world.RecyclerView;

import android.graphics.Rect;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

public class decoration extends RecyclerView.ItemDecoration{
    private int mspace;
    public decoration(int space) {
        this.mspace=space;
    }

    @Override
    public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
        super.getItemOffsets(outRect, view, parent, state);
        outRect.top=mspace;
        outRect.bottom=mspace;
        outRect.left=mspace;
        outRect.right=mspace;
    }
}
